fix config parsing from command line and json