Merge "Fix issue where max idle time > total idle time" into nyc-dev