fixed bug in threadsafe code
added  to expressive