Applied patch for extract_torv

Patch was supplied by SJ.