fix for uptime calculation