Fix undoing resize