Fix: Can't delete existing jobs with version_id==NULL

Fixes RM#5347
Merge pull request #292 from venkateshsampath/rm5347

Fix: Can't delete existing jobs with version_id==NULL