more trade bugfixes