bug for undo after reset is fixed