fix #782