Updating automate states