Fixes typo when undoing