Possibly fixed the memory issue