fix #1239