Some bug fixes to code that annotates the results.