Fixed error in stateBuilder