fixed issue when no categories present