fixed bugs in structural patterns