bug fix of State