bugfixes in HO-AC-matching and pattern matching