fix #1006