Fixed upgrade issue regarding categories tree structure.