BUG Fix: While loading the state, lastState was made null even if
lastState from JSON was not null