fix makeapikey() not found