fixed #778