fixes for command line compile