Fix backend when extracting a pattern matching