fixed #597