Fixed category indexing when adding new entries