more thread locks fixed