Solving problem with sincronization recursivity