Fixed iOS 6 and lower compatibility issues