Undo button on scratchpad bug

Currently, the undo button on the scratchpad deletes all working out on the scratchpad rather than undoing the last stroke.

Thank you! There have been a couple reports of that already.