Backports changes from the WiFiRUSH branch