Fixed State not saving to db