Fix errors in doctests