WIP: Fix crash from bad refcounting.