fix error for deleted courses