some things to get query history working properly