Fixed dynamic memory allocation.