Fixed invalid reallocations.