fix bug if course end didn't set