Fix template ref.