Fixed to work with iOS 7