Fixing iOS 5.1 bug