fix for multiple buffers