only enable buffering when needed