bugfix in idle events calculations