fix a bug produced by not setting deleted var to NULL
Merge pull request #3767 from birarda/plugs

fix a bug produced by not setting deleted var to NULL