util bugfix for matchFunction