better handling of comma-separated queries