Add limiting for when the GUI is opened

Make the GUI call only happen in the client code