Fix refcounting.