If you have selected an item, and click delete on that same item, it tries to delete it twice, since the function passes the id from the button click, as well as the checkbox, so it has both, and gives you a strange error... like below.
Category 'xswxswwsx' removed
Invalid categoryID sent: 13, so skipped removal
The question is, do we want this behavior?
I believe its a bug.
Fixing 1 should fix both.