Fix bugs in MOAB patterns.