Fix register and add duplicate course handle