Documentation fix.

Fixes 6 bugs suggested by Scrutinizer