fix envent counting