fixed issue when editing state: intials of state are now saved instead of full state name