Fix pattern matching using a list
Update ref to reference-api