This fixed #8190.  I uncommented the classes.
This fixes #8189.  It now checks for a gatewaykey before it stores the gateway.