Fix a warning in main and fix argument parsing bug.