fix bugs on first time