library bug fix