Jon security fixes

Big thanks to Panj who pointed out these bugs [in the forums](https://forums.tessel.io/t/ble-various-issues/308).