There seems to be a problem in your code. When I try to add a category, it adds it under an other category, as a subcategory, although I don't make such a choice from the dropdown list "Category" (I leave as "no parent"). I can't guess where's the problem, 'cause I don't know much about Joomla. Could you help me with this, please?