fixed bug 1340