Fixed so that the non-graphical version always terminates after five minutes.