bug fix recursion_solve