Fixed use after free