long to AtomicLong in skip calculation
Fix some concurrency issues