doctest fixes