fixed bug in doctest