fixed code in lib