fix result check for matchAll: false and empty results