fix lib build; add function index to client