fixed a memory release issue.