Fix the join course function