BME280 and supply from a pin, reset sensor/I2C

I want to feed a BME280 from a pin and turn off the supply when microcontroller goes in sleep.
Something seems to go wrong either in the communication or the calibrations. I am using Sparkfuns BME280 library.

The first measurement is OK, that is before the supply is turned off. Currently the Atmega328 does not sleep, it only has a delay.

Humidity: Reading basic values from BME280
Humidity: 26.32 Pressure: 963.71 Temp: 18.73
Humidity: 91.33 Pressure: 648.42 Temp: 22.08
Humidity: 91.71 Pressure: 651.90 Temp: 22.08
Humidity: 91.71 Pressure: 651.90 Temp: 22.08
Humidity: 91.71 Pressure: 651.90 Temp: 22.08
Humidity: 91.71 Pressure: 651.90 Temp: 22.08
Humidity: 91.71 Pressure: 651.90 Temp: 22.08

I have tried the sensor librarys reset function, tried adding Wire.begin again without result.
I have a one second delay after turning the pin back on, and after the reset/begin functions.
Also tried the sensor librarys beginI2C but then it appears to freeze.

Solved. Had to run reset() and begin().

Try to reinitialize the BME280. Powering the supply to the BME280 down may cause additional problems depending on what is connected to the I2C bus. Also you will back feed via the I2C buss into whatever is connected to it. It takes time to reset it.