fix array search