add after_update callback for deleting empty links