fix idle detection