fix a couple object cleaning bugs