Fixing up library loading