fixed macos issues