Fix argument parsing
Merge pull request #944 from lloydw/master

Fix argument parsing