Fix issue with loadLibrary