misc changes to fix/support wan gateway operation