Remove reference to main gui in session