fixed errors on removing hardcore given course id