fix for compatibility iOS 6 & 7