Fixes for running from the command line.