fixed #977