fixes sync.js, to work after p2p block
Merge pull request #35 from matiu/bug/01sync

fixes sync.js, to work after p2p block