Fixed some conditionals and make matchmaking work in test.