fix the expr cahce not properly cache problem and the wrong neighbor id  type caused problem