solved trade permits bug