fixed #3457 fixes some bug.