Fixed scope of states array