Fix bad_access in iOS 8