Fix Undo canceling a pending batch

MAGIC-99 #done