getPointerIndex fix