fix #1031