added deleteRule for model references.