event checking prevents freeze