fix the state message merge bug