Refactor iOS8 fix