Fix for using params in Session#query