fix matcher logic