fixed compatibility issue with iOS7