fix broken states array initialization