fix iOS 7 compatibility