Fix bug where we used an event_id as a pdu_id
Fix state unit test