fix state diagrams