fix object deleting