fix ios8 deprecation warning