Bug fix

Bug fix in library loading