Fixed more thread locks