End effects on productivity index of horizontal wells