fixed missing end issue in course controller