Fix bug in idle timeout for foreman.