fixing a deprecation error in iOS7