fixed #640