Fixed segfault on converting none string ref to char.
Fixed regression in prev- nextpattern validation.