fixes sync.js, to work after p2p block