Fixed bug and did minor docs improvements.