diff --git a/NEWS b/NEWS
index 18eb7b61451cb701a90911c84ecdf8c3b56e2b28..b4eafc31d95e36d9cb2014d36bcd9155d2d77fe2 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,7 @@ documents those changes that are of interest to users and administrators.
     reservations ends.
  -- Restructure srun command locking for task_exit processing logic for improved
     parallelism.
+ -- Fix issue filtering licenses for output with squeue.
 
 * Changes in Slurm 16.05.4
 ==========================
diff --git a/src/squeue/print.c b/src/squeue/print.c
index 6f1def1be24fa9db6d162cf48c28f42666c3555f..f540e6dea0c1d974cbda05c74ad4cbb0188ffc25 100644
--- a/src/squeue/print.c
+++ b/src/squeue/print.c
@@ -2413,7 +2413,7 @@ static int _filter_job(job_info_t * job)
 		while (token && filter) {
 			iterator = list_iterator_create(params.licenses_list);
 			while ((license = list_next(iterator))) {
-				if (strstr(token, license)) {
+				if (xstrcmp(token, license) == 0) {
 					filter = 0;
 					break;
 				}