fix BUG related with array_search function