Fixed an access violation and a bug in the text report.