Fixted potential application crash when reloading the library.