fixes iOS 5 compatibility