Small fixes to command line tool