Handled error in template linking