tunnel: Fix bugs.