Fixed iOS 6 compatibility