Fixed bugs and layout