fixed #3119  iOS and mac.