Fixing buffer allocation size

Fixing buffer size to reflect new flags.