Cleanup on state fixing