fixed buffering issues