I would guess that in your upload file you probably did not include a category and so it moved them to the default. Redo the upload file and make sure to add the category column and then add the correct category for each course.
There is no undo except restoring from a backup...