Cherry picked Mr.MIRA compatibility mode code
Merge pull request #59 from kho/mrmira

Mr.MIRA compatibility