fix #1010 #950