fixes in formatResults()