Fix bugs in xslt