error in next state