fix #225 and fix #232