Fixed possible memory issue.