fixed cmd line parsing in the samples
Merge pull request #388 from ivan-korolev:fix_cmd_line_parsing_in_samples