fixed issues in template