Fix searchOnClick with ajax