accidentally deleted some functions

Note that after connect it is destroying gui2
fixed gui destroy after connect