Update to work on iOS 6