Fixes iOS 6 compatibility