when json is null, the state is not overwritten (bugfix)