Thread conflict fix (lock's didn't work!)