Shared SPI [Solved]

I have a problem.
I Use the spi shared between Display, 74HC595 and 74HC165
If I write on the display after call updateOut() or updateIn(), the display does not work anymore.
I assume that my update.. unconfigure the SPI registers.

void updateOut() // 74HC595 Output
{
digitalWrite(latchPinO, LOW);
pinMode(latchPinO, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPinO, OUTPUT);
shiftOut(dataPinO, clockPin, MSBFIRST, OutReg);
digitalWrite(latchPinO, HIGH);
}

void updateIn() // 74HC165 Input
{
pinMode(dataPinI, INPUT);
digitalWrite(clockPin, HIGH);
pinMode(clockPin, OUTPUT);
digitalWrite(latchPinI, LOW);
pinMode(latchPinI, OUTPUT);
digitalWrite(latchPinI, HIGH);
InReg = shiftIn(dataPinI, clockPin, MSBFIRST );
}

Solved Calling SPI.begin(); after update