fix some bugs and styles