fixed #827