Fix selection check on iOS 8