Get rid of broken pattern match on scala version.