fixed destroying objects