Updating code to correct for new deprecations in iOS 6.0