Fixed memory allocation; not enough memory was allocated