concurrency fixes (synchronized)