fix events firing when they shouldn't