Fixed GUI disappearing bug

added logic to figure out if user was clicking on gui or not