fix bug in trade code generation for asteroids