Correcting uses of QueryRowx per feedback

plus fixing a logic goof around UpdateHost