Fix reset glitch