Fix #602. Merge will fail to work across shards
Fix some log statements