fixed crash in libxapi