workaround for stack overflow