Fix memory usage issue in Cgiters.