Fix doctest failures