fixed #662