Added iOS 8 compatibility