Moved part of fixes from another branch
Merge branch 'asana-5170912631203' of https://github.com/pubnub/objective-c into test1