added check for dom node on buffer contains