fix template issues