fixed bug 871