fixed #940