Fix tests
Fix doctest