Fixed constant buffer allocation logic.