fixed display and some bugs