fix .match() to be like .when() not .lastWhen()