fix patterns.