don't run the functions on deleted docs