fixing event matching