Some fixes for unparsed commands and a scope issue.