Fix updateElement (create new states table).