more thread safety checking