Fix NEP and ArrayOutOfBound exception on inner join