added test for weird matching cases