fix #1065