Eluna fix SQL queries