Tweaks to resize script