fix error if output pattern doesn't match