fixed parsing of command line options