fix complex command line parsing