#15: Fixed logic error in determining done

Max time limit is 900000 milliseconds.