Thread safety

actually this is ok