fix a bit of bugs
but the working has some unexpected