Added course check and fixed get_all