Fixed bugs in hermes_search