Made sub resize account for coordinate shift