Fixing dynamic resizing