adapt to some changes in librust