#8 some bugfixes for composite pattern matcher