Running into issues with memory allocation. Not reading correctly...