fixed an argument error in a query