Fixed the end of online streams not being written on the correct place.