fixed bug 1765