bugfix: scopes and recursion.