Fixed issue of open tunnels + minor changes