Refactor iOS 8.0 fix