Modified recursive call to prevent random stops