Fixed inference indexing problem