Added tests, including failing test for #800
Fixed failing test
Removed typo
Merge pull request #802 from khellang/command-sanitizer-fix

Prevent command sanitizer from replacing partial matches