Fixes for the compatibility for iOS7/iOS8.