Fixed retry code