State bugfix