fixed bugs and ui