fix bugs in template feature/export bindings