Fixed the getAllExams query