Fixing array value search