fix library bug