Fix namedqueries update

My brain must have farted when I was writing this piece of code.
Silence Dumper\'s complains about undefined values
Another brain fart fix