Fixed threadsaftey issues with Facet module.