bug fix in states