Moved synchronized outside iteration call