Small fixes in buffering