Fix bug in early termination of --top results and compile total.