Fix bugs in layout
Fix debug