Improved layout when resizing