fix template issues #2