Sync exception safeguards and some performance optimizations (LEV-168)