fix array index prob