make conses thread safe

@radumereuta please review