Fix undo right after drawing line or area