Fixed error in courses controller