fixed #766