fixed infini recursion