Deallocation fixes.