fixed #861