Hysteresis effect during reactive sputtering