Fixed parsing the command-line arguments