Fix MacOS runtime error
Fix Mac OS compile error