more pattern recognition migration fixes