Fixed some errors in docstrings and doctests