fix bug in last_relax