Bug fixes for ReportEngine.