Yes. Just noticed that we are not converting nested booleans to integers, fixed it with this recursion.