Fixes for resizing