Changes to support iOS 5