fixes for gateway