Fix smart matching