Added support for automatic tunnelling