[fix] connect got overriden with the connect lib
[fix] this.set() should return this;
[fix] Small fixes to the `sync` method as I ported it over from the client.