Fix for the expected_tokes_id bug