fixed a small issue which would cause the program to crash if a log fell behind