Fixed another related bug.

And updated and improved the  documentation a bit.