Fix bad indexing in array
Add commented out logging