fix recursion crash