fixed issue where first index outside category is included to category