bug fix #1097