Fixes problems with iOS 6.