Make synchronize module work better with local transport, fix #5668