fix macos issue