fix #1312