I think the initial `synchronized` block was wrong and must be removed.