Fixed heap corruption issue.