Improved logic for determining idleness, increased test coverage