fixed api bugs in lib