Hotfix for Incorrect reference to active gateways. Now has its own check in the constructor.