fixed #765