Rafal's commit for: Possible memory leak with reporting scheduled tasks - REPORT-398