make ri working on Mac as well