Flatten states properly
0.1.16