fix mem corruption originating in load_xoap_keys