fix bugs: add event subscriber