Fixing memory access error: allocated an array of integers, instead of array of pointers. This makes a difference on platforms where int size is 4 bytes, and pointer size is 8 bytes