to fix array bug