fixed missing trajectory recording