fixing the indexes