fix #1045