Make reference counting work.