fixed #661