fixing bugs and ui issues