add iOS 6 compatibility