fixed unassigned buffer size problem!