Fixed resizing issues with layout.