Fix reset issue

pattern serach size/step was not being reset on second optimization call.