fixing template reference