fix #1066