Fixed a bug for iOS.