fix #1068 #1089