Fixed undoing markers bug and cancel button bug