Fixed more bugs in libraries.