corrected some problem if len trrailer < number trailer in mode 3