Fixing retry bug