Bugs fixed and Lib updated