Fix issues related to iOS 8