Prevent exception due to state id manipulation