Fix vectorized state2Symbol and add tests