Category fixes

Bugfix for category tree ordering / nesting levels