fix some problem on events