Fix: replay stops at end of file

Replay ends about 5 seconds before the end though, due to a bug in line-by-line.