fixed index problem for pX