Fixed issue with all categories being deleted during updates