Fix tunnel implementation