minor bug fixes: fd for d>1, calculation of .xdif (2)