fixed remaining time math