fix a lot of bug's