fix sample buffer creation