Fix bug for performance in trending report