fix bugs and prettier