Update h.h from test.
Fix a refcount bug.