fix error that would occur if no_pattern was not set