Fixed a couple of issues with the command line version.