fixed bug 940