stops using deprecated method. This fix is only compatible with iOS 7 or later.