Fix deep recustion + add more test