fix for resizing