deleting objects

see #636, #603