state bugfix