refine uptime check