made slug check more resilient