fixed index warnings