changed the handling of xpaths, resolves #13