minor fixes and updated lib