Fix weird bug, fix states.