fixed multiple trajectory handler bug