fix delete realm
Merge remote-tracking branch 'upstream/master'
Merge pull request #501 from patriot1burke/master

fix delete when cache is on