More improvements in SQL params in queries