fix #855 #859