matcher null pointer fix