fix doctest while getting template