Fixed command-line processing