Fixed Memory Leak Merge and Added Beer's Fix