Fix command-line handling