fixed a lot of bug
fixed a lot of bug