ScanR: fix well linkage issues