fix array out of bounds bug