fix #1004