correct handling of command-line arguments