Fixed database leak in subcategoryPopulate