fix getRemainingTime