Fixed to avoid use of smartmatch (damn you 5.18)