Fixes for command line version.
merge