fixed events bug (I think?)