Allocation fixes