improved detection of bnodes