bug fixes
Merge branch 'cr' of github.com:pubnub/javascript into cr