fix array violation