fixed iOS8 deprecations