fixing a bug in adding a course