Fixed bug when creating a new course