Merge macos branch to the master (fixed bugs on Mac OS)

...t.dylib