Fix counter bug, add tunnel timeout tests.