fix the macos display error