bugfixing on the library