Added support for iOS3