Fixed bug wherein too short a log lead to an infinite loop.