Adding the undo for shifting.