fix nested state