tried to be compatible with iOS7