fixed #647