fixed bug in undo menu option