Fixed setting the states for control items.