fix: fixed bug in lib/index