Fixed 3 state bugs