Fix bug in layout