Fix some command-line related issues