Fix sync upgrade scripts