fixed index warning