fix #1020