Improvement to save memory.