support module for xtemplate. Fixes #389