Trying to fix the state error on serve