fix bug in next_tracker_out computation