lock_stat better stability against buggy output