Fixing category code when creating a course see BT#6666