bug fix in trust_period