avoid InvalidMarkExceptions