Fix delete sometimes not deleting objects