Fixed bug in pattern.