Minor update in lib func. implementation