minor fixes to recent gateway changes.