work on #923, fix #1581