Added layout, fixed bug