Merge "Prevent race condition" into main