fix atomic index