fixes problem with product flat index