fixed bugs and UI