Fix retry counting