fix bug with iOS 8