fix double free.