fixes #278, commonjs template support