fixing recursion level