fix atomic check