tradedirectory and bug fixes