fix #822