fix dispose in object builders

for #1362