Fixed a bug in finding course id