fix #996