fixed bug in layout