small bug fix in indices