Fixed a bug in running modesl recursively on Mac