Fixed few bugs in libraries.