Fixing match bug