fix recursive call