Minor bug fixes.
Merge pull request #2 from DavidSouther/bugs/oct_2013

Minor bug fixes.