Fix job retry bug with attempts.