Clear the external gateway info with object instead of id

Fixes bug: 1347123

Change-Id: I9823fd9490577be57ff4e2b742818707aaac517a