Fix doc examples to get doctest pass