fixing errors and adjusting statusbar