Fixed remaining bugs caused by not using rct2 malloc.