fix #817