put removal of courses from the learn index in a try catch block