Fix similarity bug. Use NP1 and NP2 to calculate similarity.