Fix deleting objects