Fixed performance issues with courses in term reports.