fix #1022