Fixed potential osx incompatability with _to_rm