Data Structure fixed memory issue