Fixed bad refcount