Fixed doctest exception bug.