Avoid stack overflow