Piping and wiring fixes.
Merge pull request #3402 from Segrain/master

Mapfixes.