Updated to support iOS 5