gateway fixes