Fixed bugs and ui glitches