Some fixes to autocompletion in some commands.