resolved buffer allocation issue