Polishing

Issue: SPR-11386
Use AtomicInteger instead of local synchronization around int field

Issue: SPR-11103