Removed code preventing double setting of a state, whereas that check is not required.