fix irregular sizes in layout