Fix export template

Fix #607