Minor bug fixes.
Merge pull request #291 from EricWittmann/master

Minor bug fixes.