recursive bug fix