handle the case where findPointerIndex does not find a valid index