remove refs from objects