Gateway fixes
Mote fixes