Trying to solve the memory issue.