fix bug again in tunnel generation