More bug fixes in results.py