fixing event issues