use $document in destroy callback for consistency