fix #785