added a check on the original string for resume and whether this is null