Added iOS 8 compatibitlity