Changes to adapt to iOS 7