Fixed bug 1024