There is a problem when nothing is selected. It always takes the first selection because the '#' is NOT added to the element array when created (like in the original CategoryOnUpload extension).
In other words, the default option is the first one. No way to have no selection with this code.
Of course, thanks for your contribution.