fix #777