remove duplicate state
handle early ends
0.3.1