Proper index assignment