a few fixes to make it function Xcode 6.1 for iOS 8.1