Quick fix for an use after free.