fix template friends