Optimized matching

these changes smell like a bad merge somewhere, these lines do not exist anymore in current master