Improve patch to avoid recursive call