[Object] Fix bug related to reference counting