Fix tunnel detection