Merge "Fix minor bugs with tunnel mode implementation"