Added static search variable to ensure search is only executed once