Fixes for dbInsert / dbUpdate queries