Fix mac pattern matching