xpath bugfixes, handlercopy bugfix