Fix memory issue.