Fixed sorting patterns and extra the first gram patterns.