fixes buffering and scheduling issues