Fixed remaining time calculations.