Fixes for recursion stuff of sandboxed environments