Fix uptime logic