Fixed that the state-msg was not remove properly sometimes