Updated integration with MFR (skyboy026's version).