fix layout on resize