fix right node comparison bug