Fixed run search function