fix: recursive function depth checks.