fix bug in templates