Fix in index query