fixed bug in reflection recursion