fix event router bugs and update test cases