fix for crash with error  (match) no matching pattern