Alternative solution to gateway bug.
Merge pull request #493 from goehle/gwbredux

Gateway Bug Redux (master)