Removed unneded undo check