Updated lib. Fixed different bugs.