fix #1007