fixed parsing of program options