fix deprecated code in Queries.pm