ENH: fix data buffering