fixed cursor showing when no stack on undo