fixed #996