Made the library a little thread safe...