fixed library loading issues