fix to checking for node within element