Allow initial state to be set