various fixes: command-line handling