changing case, checking for null courseInstances and changing course to courseInstance in notification