fixed #839