fix recursive call error