Fix and optimize failing students report