fixed a problem between win and macos in #1003