Fix bug in countdown logic.