Changes and Fixes for iOS 7 compatibility