Fixed reply recursion
Test scoping improvements