fix bug in proving relative termination