silent user agent fix
some SQL improvements
more fixes
Merge pull request #1617 from conejoninja/fixes

Fixes