Fixes to query stats table. Fix install script.